/*   1:    */ package com.example.administrator.myjdlc.net;
/*   2:    */ 
/*   3:    */

import android.annotation.SuppressLint;
import android.content.Context;
import android.telephony.TelephonyManager;

import com.example.administrator.myjdlc.AppApplication;

import java.text.SimpleDateFormat;
import java.util.Date;

/*   4:    */
/*   5:    */
/*   6:    */
/*   7:    */
/*   8:    */

/*   9:    */
/*  10:    */ public class CommonParameters
/*  11:    */ {
/*  12:    */   public static CommonParameters instance;
/*  13:    */   private String appKey;
/*  14:    */   private String appSecret;
/*  15:    */   private String timeStamp;
/*  16:    */   private String source;
/*  17:    */   private String eid;
/*  18:    */   private String token;
/*  19:    */   
/*  20:    */   public String getAppKey()
/*  21:    */   {
/*  22: 57 */     return this.appKey;
/*  23:    */   }
/*  24:    */   
/*  25:    */   public String getAppSecret()
/*  26:    */   {
/*  27: 61 */     return this.appSecret;
/*  28:    */   }
/*  29:    */   
/*  30:    */   public String getSource()
/*  31:    */   {
/*  32: 66 */     return this.source;
/*  33:    */   }
/*  34:    */   
/*  35:    */   public String getToken()
/*  36:    */   {
/*  37: 69 */     return this.token;
/*  38:    */   }
/*  39:    */   
/*  40:    */   public String getTimeStamp()
/*  41:    */   {
/*  42: 73 */     return this.timeStamp;
/*  43:    */   }
/*  44:    */   
/*  45:    */   public String getEid()
/*  46:    */   {
/*  47: 77 */     return this.eid;
/*  48:    */   }
/*  49:    */   
/*  50:    */   public void setEid(String eid)
/*  51:    */   {
/*  52: 81 */     this.eid = eid;
/*  53:    */   }
/*  54:    */   
/*  55:    */   public void setToken(String token)
/*  56:    */   {
/*  57: 89 */     this.token = token;
/*  58:    */   }
/*  59:    */   
/*  60:    */   public static CommonParameters getInstance()
/*  61:    */   {
/*  62: 97 */     if (instance == null) {
/*  63: 98 */       instance = new CommonParameters();
/*  64:    */     }
/*  65:100 */     instance.timeStamp = getTimeStr();
/*  66:101 */     return instance;
/*  67:    */   }
/*  68:    */   
/*  69:    */   public CommonParameters()
/*  70:    */   {
/*  71:106 */     this.appKey = "20151117142715";
/*  72:107 */     this.appSecret = "afff9708359346c6a04df04d800ff8e1";
/*  73:108 */     this.source = "baidu";
/*  74:109 */     this.eid = getDeviceId();
/*  75:    */   }
/*  76:    */   
/*  77:    */   public void init()
/*  78:    */   {
/*  79:113 */     this.appKey = "20151117142715";
/*  80:114 */     this.appSecret = "afff9708359346c6a04df04d800ff8e1";
/*  81:115 */     this.source = "baidu";
/*  82:116 */     this.eid = getDeviceId();
/*  83:117 */     instance.timeStamp = getTimeStr();
/*  84:    */   }
/*  85:    */   
/*  86:    */   @SuppressLint({"SimpleDateFormat"})
/*  87:    */   private static String getTimeStr()
/*  88:    */   {
/*  89:126 */     SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMddHHmmss");
/*  90:127 */     Date curDate = new Date(System.currentTimeMillis());
/*  91:128 */     return formatter.format(curDate);
/*  92:    */   }
/*  93:    */   
/*  94:    */   private String getDeviceId()
/*  95:    */   {
/*  96:136 */     TelephonyManager telephonyManager = (TelephonyManager) AppApplication.getContext().getSystemService(Context.TELEPHONY_SERVICE);
/*  97:    */     
/*  98:138 */     String deviceId = telephonyManager.getDeviceId();
/*  99:    */     
/* 100:140 */     String sn = telephonyManager.getSimSerialNumber();
/* 101:141 */     if (deviceId == null) {
/* 102:142 */       deviceId = "123456789";
/* 103:    */     }
/* 104:144 */     return deviceId;
/* 105:    */   }
/* 106:    */ }



/* Location:           C:\Users\Administrator\Desktop\BaseUtils.jar

 * Qualified Name:     com.jzkj.manage.net.CommonParameters

 * JD-Core Version:    0.7.0.1

 */